--[[ 编码: JX-108-22 名称: 巨星出库-初始化 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: InitialTopViewDlg 功能: -- 获取当前登录人的账号和姓名 -- 获取本机登录的 MAC 地址,这个在网页版是实现不了的,需要在MBC运行 更改记录: --]] wms_base = require( "wms_base" ) function InitialTopViewDlg ( strLuaDEID ) local nRet, strRetInfo -- 获取当前登录人员账号名称及PC绑定的站台 local login_info nRet, login_info = wms_base.Get_CurLoginUserInfo( strLuaDEID ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), login_info ) end local strCondition = "" if ( login_info.station ~= '') then -- 获取未执行任务 -- N_B_STATE = 5 巨星出库 到站台的任务 strCondition = "S_STATION_NO = '"..login_info.station.."' AND N_B_STATE = 5 AND S_TASK_TYPE = '出库'" end local action = { { action_type = "set_dlg_attr", value = { { attr = "Operator", value = login_info.user_name, enable = false }, { attr = "S_STATION_NO", value = login_info.station } } } } if ( login_info.station ~= '') then action[2] = { action_type = "set_query_condition", value = { condition = strCondition, order = "S_SOURNO", page_name = "已到站台" } } strCondition = "S_STATION_NO = '"..login_info.station.."' AND (N_B_STATE = 0 OR N_B_STATE = 1) AND S_TASK_TYPE = '出库'" action[3] = { action_type = "set_query_condition", value = { condition = strCondition, order = "S_SOURNO", page_name = "出库搬运中..." } } end nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction失败! "..strRetInfo ) end end